<template>
	<view class="">
		<u-navbar titleStyle="font-size:40rpx;color:#333" :placeholder='true' title="申请商品清单" :autoBack="true">
		</u-navbar>
		<view class="padding32">
			<view class="whiteBox">
				<view class="fontS24 co3" style="margin-bottom: 20rpx;">
					个人/公司名称
				</view>
				<u-input customStyle="height:37rpx" placeholder="请输入个人/公司名称" border="surround" v-model="bill_full_name"
					@change="change"></u-input>
				<view class="fontS24 co3" style="margin: 20rpx 0;">
					地址
				</view>
				<u-input customStyle="height:37rpx" placeholder="请输入地址" border="surround" v-model="bill_address"
					@change="change"></u-input>
			</view>
			<view class="btn cof bgcred center fixed" @click="btnclick">
				保存
			</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				sub_order_id:'',
				bill_address:"",
				bill_full_name:"",
			}
		},
		onLoad(option) {
			this.sub_order_id=option.id?option.id:''
		},
		methods:{
			btnclick(){
				this.$my.post('/index/user_order/set_bill',{sub_order_id:this.sub_order_id,bill_address:this.bill_address,bill_full_name:this.bill_full_name}).then(res=>{
					if(res.code==200){ 
						uni.redirectTo({
							url:"/pages/my/ticket/listGoods?id="+this.sub_order_id
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	page{
		padding-bottom: 150rpx;
	}
	.btn {
		height: 80rpx;
		line-height: 80rpx;
		border-radius: 40rpx;
		bottom: 40rpx;
		width: 90%;

	}
</style>
